package com.deductive.domain.wq;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 救治信息表
 * @TableName disposition_wq_jzxx
 */
@TableName(value ="disposition_wq_jzxx")
@Data
public class DispositionWqJzxx implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;

    /**
     * 手术次数
     */
    @TableField(value = "surgery_number")
    private Integer surgeryNumber;

    /**
     * 输液总量
     */
    @TableField(value = "infusion_number")
    private Integer infusionNumber;

    /**
     * 用药总量
     */
    @TableField(value = "taking_medication_number")
    private Integer takingMedicationNumber;

    /**
     * 救治总量
     */
    @TableField(value = "treatment_number")
    private Integer treatmentNumber;

    /**
     * 救治措施
     */
    @TableField(value = "treatment_measures")
    private String treatmentMeasures;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DispositionWqJzxx other = (DispositionWqJzxx) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSurgeryNumber() == null ? other.getSurgeryNumber() == null : this.getSurgeryNumber().equals(other.getSurgeryNumber()))
            && (this.getInfusionNumber() == null ? other.getInfusionNumber() == null : this.getInfusionNumber().equals(other.getInfusionNumber()))
            && (this.getTakingMedicationNumber() == null ? other.getTakingMedicationNumber() == null : this.getTakingMedicationNumber().equals(other.getTakingMedicationNumber()))
            && (this.getTreatmentNumber() == null ? other.getTreatmentNumber() == null : this.getTreatmentNumber().equals(other.getTreatmentNumber()))
            && (this.getTreatmentMeasures() == null ? other.getTreatmentMeasures() == null : this.getTreatmentMeasures().equals(other.getTreatmentMeasures()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSurgeryNumber() == null) ? 0 : getSurgeryNumber().hashCode());
        result = prime * result + ((getInfusionNumber() == null) ? 0 : getInfusionNumber().hashCode());
        result = prime * result + ((getTakingMedicationNumber() == null) ? 0 : getTakingMedicationNumber().hashCode());
        result = prime * result + ((getTreatmentNumber() == null) ? 0 : getTreatmentNumber().hashCode());
        result = prime * result + ((getTreatmentMeasures() == null) ? 0 : getTreatmentMeasures().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", surgeryNumber=").append(surgeryNumber);
        sb.append(", infusionNumber=").append(infusionNumber);
        sb.append(", takingMedicationNumber=").append(takingMedicationNumber);
        sb.append(", treatmentNumber=").append(treatmentNumber);
        sb.append(", treatmentMeasures=").append(treatmentMeasures);
        sb.append(", remark=").append(remark);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}